Many traditional computer applications allow users to define a geometric shape or figure (simply referred to herein as a geometry). The terms “geometry shape” or simply “geometry,” as used herein, may refer to one or more properties defining a shape. Such properties may include, for example, a length, angle, position, points, radii, center, and any other suitable property usable to specify a geometric relationship. In some cases, a geometry may be composite or complex geometry that is composed of multiple sub-geometries. For example, a complex geometry may be comprised of various points, lines, curves, and the like.
Many traditional computer applications provide drawing tools for users to define geometries. In general, these drawing tools may be specifically configured to produce a certain type of geometry, and may be especially useful for input devices such as keyboards and mouse. For example, a “line” drawing tool may be configured to create line geometries, while an “arc” drawing tool may be configured to create arc geometries. Since there is possibly more than one method to define many types of geometries, each specific tool may have multiple options for defining a given type of geometry. For example, an “arc” tool can define an arc geometry by either using three different points, or, alternatively, by using a center, radius, start angle and end angle. As a result, two options could be available in the “arc” tool for users to choose. Furthermore, for composite shapes comprising of multiple sub-geometries, multiple tools may be needed to define each comprising sub-geometry. This all requires users to learn each of the related drawing tools and the corresponding options used to define the various types of geometries. Further, because users may need to switch between different tools/options for a composite geometry, many iterative inputs may be necessary.
In comparison to drawing tool-based methods for generating types of geometries, a free-hand drawing application may operate without use of any specific drawing tool. Instead, free-hand drawing applications simply process sketch input received on devices such as touchscreen and interprets it as graphics. Since it is very similar to the drawing process of using pen and paper, free-hand drawing applications are considered to be natural, intuitive and easy to use. However, the sketch input from a free-hand drawing application, without further processing, is typically in rough form that lacks certain geometric information and precision (e.g., a line may not be straight, for example).
In some cases, traditional free-hand drawing applications may attempt to “beautify” the sketch input by matching rough sketches to predefined geometric shapes, which are then used to replace the rough sketches. To illustrate, such traditional free-hand drawing applications may interpret the rough sketches by performing a series of processes on the input stroke, such as, for example, calculating direction, speed and curvature to segment a rough sketch. Each segment from the rough sketch is then tested to match a primitive shape that best fits the segment.
United States Patent Publication 2006/0227140, by Jiantao Pu et al., entitled “Sketch Beautification,” discloses a technique for providing different ways of beautifying sketches by segmenting sketch data and then performing primitive recognition. A circle-scanning strategy is used to segment a stroke into independent primitives. For geometric primitive recognition, a shape histogram method is used, which includes a sampling process, and a process of building corresponding distance histogram, a normalization process and, finally, computing similarity between two histograms.
United States Patent Publication 2006/0045343, by Christopher Tremblay, entitled “Sketch Recognition and Enhancement,” discloses a technique for recognizing sketch input based on stroke data and its time associated information. In this reference, complex shapes can be grouped and recognized based on time proximity. During the recognition process, first a stroke comparator will be used to compare to, and recognize as, a known shape. If a stroke does not match a known shape, a generic low level recognition process is used to find the high curvature point for segmentation, and further recognize each segment as a line or curve.
Generally, a sketch recognition process can be delayed or real-time. For a delayed recognition process, it only starts after users finish the sketch input. Once misrecognition happens, it will be difficult to adjust the results and the wrong result could even propagate.
Recent advancements have adopted real-time incremental recognition. For example, a paper by J Arvo et al., entitled “Fluid sketches: continuous recognition and morphing of simple hand-drawn shapes,” In Proceedings of UIST '00 Proceedings of the 13th annual ACM symposium on User interface software and technology, 2000. New York, N.Y., USA: ACM Press (“Fluid Sketches”), suggests the concept of “fluid sketching.” At determinable time intervals, the fluid sketching concept evaluates the input stroke to geometric shapes (such as circle, box etc.), to find the best fit to the input stroke, and provide instant feedback of sketch recognition. However, the fluid sketching concept contemplated by paper Fluid Sketches may fail to provide proper feedback for a user trying to draw a geometric shape not previously defined by the system.
A paper by J. Li et al., entitled “Sketch recognition with continuous feedback based on incremental intention extraction,” In Proceedings of the 10th International Conference on Intelligent User Interfaces, 2005, San Diego, Calif., USA, ACM Press (“Sketch Recognition with Continuous Feedback”), introduces a method of sketch recognition with continuous feedback based on incremental intention extraction. The method introduced by Sketch Recognition with Continuous Feedback recognizes a continuous stroke input based on its sections: during the continuous input, every a fixed number of input points are collected into a section. Whenever recent input points are accumulated to form a new section, the algorithm discussed in Sketch Recognition with Continuous Feedback tries to identify a geometry as the intention of the section. In some cases, the methods described in Sketch Recognition with Continuous Feedback may update existing sections by determining if the current section can be combined with its previous section or not. For example, if both sections are line sections and the two lines are collinear, the two sections can be combined. Thus, the method of Sketch Recognition with Continuous Feedback operates by collecting a determinable number of sketch point data (e.g., a section) and then matching the collected sketch point data with a geometry.